package com.ruoyi.project.channel.vwPlatformStat.controller;

import java.math.BigDecimal;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.channel.vwPlatformStat.domain.VwPlatformStat;
import com.ruoyi.project.channel.vwPlatformStat.service.IVwPlatformStatService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;

/**
 * VIEW信息操作处理
 * 
 * @author zero
 * @date 2019-05-19
 */
@Controller
@RequestMapping("/channel/vwPlatformStat")
public class VwPlatformStatController extends BaseController
{
    private String prefix = "channel/view";
	
	@Autowired
	private IVwPlatformStatService vwPlatformStatService;
	
	@RequiresPermissions("channel:vwPlatformStat:view")
	@GetMapping()
	public String vwPlatformStat()
	{
	    return prefix + "/vwPlatformStat";
	}
	
	/**
	 * 查询VIEW列表
	 */
	@RequiresPermissions("channel:vwPlatformStat:list")
	@PostMapping("/list")
	@ResponseBody
	public TableDataInfo list(VwPlatformStat vwPlatformStat)
	{
		startPage();
        List<VwPlatformStat> list = vwPlatformStatService.selectVwPlatformStatList(vwPlatformStat);
		return getDataTable(list);
	}
	
	
	/**
	 * 导出VIEW列表
	 */
	@RequiresPermissions("channel:vwPlatformStat:export")
    @PostMapping("/export")
    @ResponseBody
    public AjaxResult export(VwPlatformStat vwPlatformStat)
    {
    	List<VwPlatformStat> list = vwPlatformStatService.selectVwPlatformStatList(vwPlatformStat);
        ExcelUtil<VwPlatformStat> util = new ExcelUtil<VwPlatformStat>(VwPlatformStat.class);
        return util.exportExcel(list, "vwPlatformStat");
    }
}
